Skip to main content

formatCurrencyWithCustomPattern

formatCurrencyWithCustomPattern

formatCurrencyWithCustomPattern(value: number , currencyCode: string , formatPattern: string ) : string

Formats a number with a custom pattern and combines it with a currency symbol.

Function Parameters

value:::

  • value: number

The numeric value to format.

currencyCode:::

  • currencyCode: string

The ISO currency code (e.g., 'USD').

formatPattern:::

  • formatPattern: string

The custom format pattern (e.g., '#,##0.00').

Returns

string

Defined in : link:https://github.com/thoughtspot/ts-chart-sdk/blob/f477c20/src/utils/number-formatting/number-formatting.ts#L50

--